/*
* @Author: dengjiayao
* @Date:   2017-04-10 15:20:05
* @Last Modified by:   dengjiayao
* @Last Modified time: 2017-04-18 14:40:40
*/
import Vue from '../vue'
import store from '../vuex/store'
import loginCheck from '../util/login-check'
import { alert } from 'vue-strap'
import GaoList from '../component/gao/article/list/list.vue'
import GaoConfig from '../component/gao/article/config/config.vue'

new Vue({
  el: 'body',
  components: {
    'vue-alert-msg': alert,
    'vue-gao-article-list': GaoList,
    'vue-gao-article-config': GaoConfig
  },
  store,
  vuex: {
    getters: {
      msg: state => state.msg
    }
  },
  created() {
    loginCheck(this)
  },
  methods: {
    showAddModal() {
      var configModal = this.$refs.articleGaoConfig
      configModal.actionType = 'CREATE'
      configModal.ad = {
        betaId: '',
        betaName: '',
        betaDesc: '',
        betaType: '0'
      }
      configModal.showModal = true
    }
  }
})
